package com.andnnl.jm;

import cn.hutool.core.codec.Base64;

/**
 * Created by chenss on 2022/5/23.
 */
public class Base64Test {

    public static final String KEY2 = "Kk8y6o22";

    public static void main(String[] args) {
        test1();
        System.out.println();
        testUrlParam();
    }

    private static void testUrlParam() {
        String rs=Base64.encode("去奔顶置 名车3提芝加哥胡志明asldkrfj23i0r9j2we09人压1+++","utf-8");
        System.out.println("encode:"+rs);
        rs=Base64.decodeStr(rs,"utf-8");
        System.out.println("decodeStr:"+rs);
    }

    private static void test1() {
        byte[] rs = Base64.decode("Kk8y6o84zUk=");

        System.out.println("b:"+new String(rs));
        String hex = ByteUtil.byteArray2HexString(rs);
        System.out.println(hex);
    }

    private static final char[] pem_array = new char[]{'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
}
